feat(grafana): MySQL 7362 and PostgreSQL 9628/14114 curated packs - #369
feat(grafana): MySQL 7362 and PostgreSQL 9628/14114 curated packs#369shmsr wants to merge 2 commits into
Conversation
Operators migrating these community dashboards hit exporter typing, Helm label noise, and metric-name drift that a generic PromQL pass cannot know. Bundle packs plus the engine support they need so the installable CLI produces usable Kibana panels without a custom rules file.
| return None | ||
| if "computed_value" in metric_fields: | ||
| metric_col = "computed_value" | ||
| metric_fields = ["computed_value"] |
| return None | ||
| if "computed_value" in metric_fields: | ||
| metric_col = "computed_value" | ||
| metric_fields = ["computed_value"] |
Bare instant gauges were kept native before the live-missing check, so absent tiles scored green and Elasticsearch could emit value_$1/$2 instead of value. Fall through to telemetry-missing markdown, treat CONCAT EVAL aliases as series keys, and expect ignored-label matchers to stay native after stripping.
giorgi-imerlishvili-elastic
left a comment
There was a problem hiding this comment.
I found three correctness blockers, so I cannot approve this yet.
-
panels.py:2603treats every metric absent from a resolver withdiscovery_status == "ok"as proven absent.merge_control_schema()also sets that status for intentionally partial control-schema hints. As a result, this PR drops native queries for metrics that simply are not listed in the partial fixture:test_k8s_cluster_affects_all_live_query_panelsnow emits 6 queries instead of 13 and fails on Python 3.11, 3.12, and 3.13 (reproduced locally). This matters beyond the test because operators using--control-schemacan lose otherwise valid panels. Please distinguish exhaustive live field-caps from partial merged hints before applying the missing-metric gate, and keep/add regression coverage for the partial-control-schema path. -
The
live_optionalpath can crash when all targets are optional and field-caps prove them absent. The loop records onlytolerated_live_metric_target_refs, leavestranslationsanddropped_live_metric_targetsempty, then indexestranslations[0]atpanels.py:4259. I reproduced this with a one-targetoptional_metricpanel and receivedIndexError: list index out of range. Since this PR expandslive_optional_metricsand claims graceful handling for absent optional telemetry, please add an explicit zero-translation fallback (for example, missing-telemetry markdown) plus an optional-only regression test. -
Two new registry pins are not the dashboards they claim to identify. Using this repository's
scripts.fetch_community_corpus.canonical_sha256against grafana.com gives:- 9628 revision 1:
2eda2afc28c140374b38d4bad2bc23b3e96667713a2187ad458117eb7ea131d4, not521bac...; additionally the committed community corpus pins revision 8 (a3c1f753...) while this pack/manfiest says revision 1. - 14114 revision 1:
76b92bbeb9b2d8f3f8abec10b7cb016da87803deca34a99dddab9f668010a53d, not5f9061...(the corpus already has the correct value).
- 9628 revision 1:
Please correct the hashes and reconcile which 9628 revision was actually validated across registry.yaml, pack.yaml, the fidelity manifest, and the corpus. A test that validates registry pins against committed corpus entries would prevent this silent mismatch.
The focused PR suite passes locally (1048 passed, 36 subtests passed), but the full unit-test jobs are red because of item 1.
Summary
--rules-file.ignored_labelsfrom native PromQL (and skip synthesizing those controls), do not yellow panels whose source metric islive_optionaland absent, Grafana 5 singlestat units/decimals, and treat surviving EVAL aliases as Lens series.mysql-load/postgres-loadplus mysqld_exporter counter typing in the redis curated compose so 7362/9628 are not idle zero scrapes.Test plan
pytest tests/test_curated_packs.py tests/test_migrate.py tests/targets/kibana/test_esql_utils.pymetrics-*(--translation-mode auto --upload --smoke)pg_up, notup)grafana-validate-uploadedon the three dashboards: no empty/error panels that are not documented pack approximations (9628 Version / Start Time remain approximate by design)